// TypeScript file
class StreakNum extends egret.Sprite
{
    private showSorce: SpecialNumber;
    private comboWidth: number = 0;
    constructor()
    {
        super();
        this.initView();
    }

    private initView(): void
    {
        let combo: egret.Bitmap = ResourceUtils.createBitmapByName("combo_png");
        this.addChild(combo);
        this.comboWidth = combo.width;
        this.showSorce = new SpecialNumber("number-0");
        this.showSorce.x = this.comboWidth / 2 - this.showSorce.width / 2;
        this.showSorce.y = combo.height + 5;
        this.addChild(this.showSorce);
    }

    public setValue(num: number = 0): void
    {
        this.showSorce.setValue(num+"");
    }
}